package sf.database.dialect;

import sf.database.meta.TableMapping;
import sf.database.support.DBMS;
import sf.jooq.JooqSupportDatabase;
import sf.querydsl.QueryDSLSupportDatabase;

import java.sql.Connection;

/**
 * 默认的dialect
 */
public class DefaultDBDialect extends DBDialect {

    public static final DefaultDBDialect instance = new DefaultDBDialect();

    public DefaultDBDialect() {
        this.keywords.addAll(Keywords.DEFAULT);
    }

    @Override
    public String getName() {
        return DBMS.defaultDB.name();
    }

    @Override
    public int getNumber() {
        return DBMS.defaultDB.getNumber();
    }

    @Override
    public String getHibernateDialect() {
        throw new UnsupportedOperationException("not support!");
    }

    @Override
    public String sqlTableDrop(String table) {
        throw new UnsupportedOperationException("not support!");
    }

    @Override
    public String sqlTableRename(String oldName, String newName) {
        throw new UnsupportedOperationException("not support!");
    }

    @Override
    public String sqlColumnRename(String table, String oldColumnName, String newColumnName) {
        throw new UnsupportedOperationException("not support!");
    }

    @Override
    public String sqlColumnAdd(String table, String column_definition, String column_position) {
        throw new UnsupportedOperationException("not support!");
    }

    @Override
    public String sqlColumnModify(String table, String column_definition, String column_position) {
        throw new UnsupportedOperationException("not support!");
    }

    @Override
    public String sqlColumnDrop(String table, String column) {
        throw new UnsupportedOperationException("not support!");
    }

    @Override
    public boolean createEntity(Connection conn, TableMapping en) {
        throw new UnsupportedOperationException("not support!");
    }

    @Override
    public String uniqueSql(String tableName, String name, String[] columnNames) {
        throw new UnsupportedOperationException("not support!");
    }

    @Override
    public String getQueryDslDialect() {
        return QueryDSLSupportDatabase.SQLDEFAULT;
    }

    @Override
    public String getJooqDialect() {
        return JooqSupportDatabase.DEFAULT;
    }
}
